home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Atari Mega Archive 1
/
Atari Mega Archive - Volume 1.iso
/
gnu
/
progutil
/
stdwin.zoo
/
atari
/
style.c
< prev
next >
Wrap
C/C++ Source or Header
|
1990-03-30
|
1KB
|
92 lines
#include <vdibind.h>
#include "tools.h"
#include "stdwin.h"
#include "style.h"
TEXTATTR wattr;
extern int vdi_handle ;
static void
setattr ()
{
int effect = 0 ;
if (wattr.style & BOLD)
effect |= 0x01 ;
if (wattr.style & ITALIC)
effect |= 0x04 ;
if (wattr.style & UNDERLINE)
effect |= 0x08 ;
if (wattr.style & HILITE)
effect |= 0x01 ;
if (wattr.style == PLAIN)
effect = 0x00 ;
vst_effects (vdi_handle, effect) ;
}
void
wsetplain()
{
wattr.style = PLAIN ;
setattr () ;
}
void
wsethilite()
{
wattr.style |= HILITE ;
setattr () ;
}
void
wsetinverse()
{
wattr.style |= INVERSE ;
setattr () ;
}
void
wsetitalic()
{
wattr.style |= ITALIC ;
setattr () ;
}
void
wsetbold()
{
wattr.style |= BOLD ;
setattr () ;
}
void
wsetbolditalic()
{
wattr.style |= BOLD | ITALIC ;
setattr () ;
}
void
wsetunderline()
{
wattr.style |= UNDERLINE ;
setattr () ;
}
void
wgettextattr(attr)
TEXTATTR *attr ;
{
*attr= wattr ;
}
void
wsettextattr(attr)
TEXTATTR *attr ;
{
wattr= *attr ;
setattr () ;
}